import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import actions from './actions'
import mutations from './mutations'
// import * as lotteryInfo from './modules/lotteryInfo'


// 注册使用vuex
Vue.use(Vuex)
//rootState 根状态
const state = {
    userInfo: { //用户信息
        islogin: 0, //是否登陆
        loginUser: "", //用户id
        token: "", //用户密钥
        username: "", //用户名
        balance: "", //余额
        integral: "", //积分
        loginUserType: "", //用户类型
    },
    systemInfo: { //系统信息
        sitename: "",
        qq: "", //客服QQ
        copyright: "", //copyright
        customerService: false, //客服跳转
        customerTel: "" //客服电话
    }
}

//vuex注入vue
export default new Vuex.Store({
    state,
    getters,
    actions,
    mutations,
})
